<template>
  <h1>About</h1>
  <h1>About</h1>
  <button @click="store.commit('SET_COUNT')">
    count++,  {{ store.state.count }}
  </button>
  |
  <button @click="store.commit('SET_COUNT')">
    count++,  {{ count }}
  </button>
  <hr>
</template>

<script>
import { toRefs } from "vue"
import { useStore } from "vuex"
import http from "../utils/http";
import axios from "axios";

export default {
  setup() {
    const store = useStore()
    const { count } = toRefs(store.state)

    axios({
      url: "/api/task"
    }).then(res => {
      console.log(res)
    })

    http({
      url: `/comments`
    }).then(res => {
      console.log(res)
    })


    return {
      count,
      store
    }
  }
}
</script>

